]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
main: Initialize brightnessManager before panel
authorSebastian Keller <skeller@gnome.org>
Fri, 11 Sep 2026 11:05:50 +0000 (13:05 +0200)
committerFlorian Müllner <fmuellner@gnome.org>
Sun, 13 Sep 2026 17:39:10 +0000 (19:39 +0200)
The brightness indicator initialized via
`QuckSettings::_setupIndicators()` as part of the panel initialization
depends on `Main.brightnessManager`, which was only getting initialized
after the panel in `_initializeUI()`.

In practice this usually was not a problem, because the wait for
NetworkManager and Bluetooth in `_setupIndicators()` was enough of a
delay for `Main.brightnessManager` to have been initialized by the time
the brightness indicator is initialized. But on systems where
gnome-shell was built without these, this could have resulted in quick
settings not initializing properly.

Closes: https://gitlab.gnome.org/GNOME/gnome-shell/-/work_items/9378
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/4401>
(cherry picked from commit 1e6e40e2a7e48ff1d319ba110de756a14c1dd550)

js/ui/main.js

index 01a18b5a2d20e4f5b872033093b650b052b26507..3f8bbf57601557e2464f2c2a800ec53f1f0a19b0 100644 (file)
@@ -244,6 +244,9 @@ async function _initializeUI() {
 
     screenshotUI = new Screenshot.ScreenshotUI();
 
+    brightnessManager = new BrightnessManager.BrightnessManager();
+    brightnessDBus = new ShellDBus.BrightnessDBus(brightnessManager);
+
     messageTray = new MessageTray.MessageTray();
     panel = new Panel.Panel();
     keyboard = new Keyboard.KeyboardManager();
@@ -260,9 +263,6 @@ async function _initializeUI() {
     breakManagerDispatcher = new BreakManager.BreakDispatcher(breakManager);
     timeLimitsDispatcher = new TimeLimitsManager.TimeLimitsDispatcher(timeLimitsManager);
 
-    brightnessManager = new BrightnessManager.BrightnessManager();
-    brightnessDBus = new ShellDBus.BrightnessDBus(brightnessManager);
-
     global.connect('shutdown', () => {
         // Block shutdown until the session history file has been written
         const loop = new GLib.MainLoop(null, false);